/*
The surface-physics project: http://code.google.com/p/surface-physics/
Adds real world physics based on the Bullet physics engine, to bases in the Orbiter space
flight simulation software.

Written by Abhijit Nandy
License : Apache License 2.0

Bump_MSHImporter.h


This file declares the Bump_MSHImporter class.
Used to import MSH format meshes into the Bullet world
Can be used to import only 1 mesh at a time & maintain its indices & vertices in memory.

*/


#pragma once


#include "../Engine//PhysicsEngine.h"

extern PhysicsEngine *phyEngine;
extern char boutput[1000];


/**
 * The Bump_MSHImporter to create and manage a supporting terrain
 */
class Bump_MSHImporter
{

	btVector3 *vertices;
	int *indices;

	//Vertices, collision shape and rigid body for this patch
	btTriangleIndexVertexArray *m_indexVertexArrays;
	btBvhTriangleMeshShape *collShpMSH;
	btRigidBody* rbMSH;

	char fileName[256];

public:

	Bump_MSHImporter();
	virtual ~Bump_MSHImporter();


	int addMSH(char *fileName, btVector3& offset);
	int removeMSH(void);

};


